﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity.Core.Objects;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using Autofac;
using Autofac.Integration.Mvc;
using Hrm.Core;
using Hrm.Services;

namespace Hrm.ConsoleTest
{
    class Program
    {
        static void Main(string[] args)
        {
            //IDependencyRegistrar registrar = new DependencyRegistrar();

            //var builder = new ContainerBuilder();
            //registrar.Register(builder);
            //var container = builder.Build();
            ////builder.Update(container);
            ////DependencyResolver.SetResolver(new AutofacDependencyResolver(container));

            //User person = new User()
            //{
            //    Id = 2,
            //    UserName = "DavidZhang",
            //    Telephone = "18001851891",
            //    Address = "鑫康苑",
            //};
            //IUserService personService = container.Resolve<IUserService>();
            //personService.AddPerson(person);

            //IDbContext context = container.Resolve<IDbContext>();

            //SqlParameter para=new SqlParameter("UserCode","20140701");
            //IEnumerable<User> list = context.ExecuteStoredProcedureList<User>("[dbo].[GetAllUser]", para).Where(p => p.UserName == "20140701").ToList();
            //foreach (var item in list)
            //{
            //    Console.WriteLine(item.UserName);
            //}
            ExpressionEngine exp = new ExpressionEngine();
            exp.Main();
            Console.Read();
        }
    }
}
